package main

import (
	"fmt"
	"time"
)

func main() {
	var channels [10]chan int
	for i := 0; i < 10; i++ {
		channels[i] = make(chan int)
		go work(i, channels[i])
	}
	for i := 0; i < 10; i++ {
		channels[i] <- 'a' + i
	}
	time.Sleep(time.Second)
}

func work(i int, ch chan int) {
	fmt.Printf("Worked %d received %c \n", i, <-ch)
}
